Arrangement and method for reducing the processing time of a data processing device

ABSTRACT

The invention herein pertains to a data processing device ( 1 ) with a processor ( 2 ) and a memory ( 3 ). The memory ( 3 ) comprises a first memory sector ( 4 ) and a second memory sector ( 6 ), a first cache ( 5 ) being arrayed for the first memory sector ( 4 ) and a second cache ( 7 ) being arrayed for the second memory sector ( 6 ). It is the function of the second cache ( 7 ) that predetermined and selected sub-programs, interrupt vectors ( 8 ) and interrupt handlers ( 9 ), which are normally stored in the second memory sector ( 6 ), which is, for example, a ROM memory or a RAM memory, are saved in temporary storage in the second cache ( 7 ). It is an advantage that no displacement cycles take place in the second cache ( 7 ).

[0001] This application pertains to an array and a process suitable for reducing the processing time of a data processing device.

[0002] Data processing devices are used to process data and to control, organize and analyze input and output signals. During operation of a data processing device, which usually comprises a processor and a memory, interrupts, so called, will occur. These are signals which indicate an event to the processor. An example of such events may be conditions, results or events generated both within the processor or the CPU (Central Processing Unit) and outside of the CPU, and which require execution of a specific routine in reaction to the event. The specific routine is the interrupt routine, whose start address is located at a given memory address of the memory as an interrupt vector, so called. In addition, interrupt handlers, so called, are in use; they are small program segments which are executed upon occurrence of an interrupt in order, for example, to determine the source of the interrupt.

[0003] Since interrupt vectors have to be available as well during cold start or warm start of a data processing device, they are saved in a non-temporary memory sector, such as a ROM (Read Only Memory). However, a ROM has the disadvantage of requiring a very long access time, a fact which entails significant interrupt latencies. For this reason, the suggestion is made, for example, in “ARM Training Material: Technical Training Course 1999, Chapter 16 and Chapter 19” to copy the interrupt vectors into a faster RAM (Random Access Memory) sector after starting the data processing device, and then to overlay this sector over the address sector originally occupied by the ROM. It is also mentioned in connection with this process that the RAM sector is mapped on the place of the original ROM sector. This process makes it possible to cut the interrupt latency approximately in half.

[0004] It is the purpose of the invention to state an array and a process which further reduce the processing time of a data processing device.

[0005] In accordance with the invention, the purpose is met by a data processing device comprising:

[0006] a processor;

[0007] a memory connected to the processor and having a first memory sector and a second memory sector;

[0008] a first cache which images the first memory sector and places a portion of the first memory sector in temporary storage;

[0009] a second cache which images the second memory sector and places it in temporary storage,

[0010] wherein the second cache has the same memory capacity as the second memory sector and

[0011] wherein the second memory sector is a RAM, a ROM, an EPROM or an EEPROM.

[0012] This array makes it possible to use two separate cache memories, of which one, for example, is suitable for storing the interrupt vectors and interrupt handlers, while the other cache is available in the conventional manner for temporary storage of the main memory. In comparison with the main memory, such a cache is a small and fast memory which places data from the large and slower main memory into temporary memory. As a rule, displacement cycles occur in the cache, as the cache is much smaller than the main memory to be saved in temporary storage. Storage of the interrupt vectors and interrupt handlers in a cache ensures significant reduction in the processing time of an interrupt.

[0013] In one embodiment of the array in the invention, an interrupt vector is to be stored in the second cache. This array makes it possible to place the entire second memory sector in temporary storage in the second cache, thus keeping the interrupt vectors ready for fast memory access.

[0014] In another embodiment of the array in the invention, an interrupt handler is to be stored in the second cache. . This array makes it possible to place the entire second memory sector in temporary storage in the second cache, thus keeping the interrupt handlers ready for fast memory access.

[0015] Furthermore, the memory capacity of the first cache is to be smaller than the memory capacity of the first memory sector. This embodiment permits cost-saving use of a cache which is significantly smaller than the first memory sector. This requires, however, that displacement cycles, so called, occur in the cache, replacing no longer needed data in temporary storage in the cache with other data from main memory which are being processed in the CPU at the moment.

[0016] In a further embodiment of the invention, the processor is to be a processor from ARM corporation. This array makes it possible to use ARM's entire family of processors which, for example, comprises the ARM7 processor.

[0017] Plans call for the second memory sector to be a ROM, an EPROM or an EEPROM. This array will guarantee that interrupt vectors and interrupt handlers will be available in the second memory sector and the second cache upon cold start or warm start.

[0018] Regarding the process, the purpose is met by a process for operating a data processing device comprising the following steps:

[0019] provision of a data processing device comprising a processor and a memory,

[0020] wherein the memory has a first memory sector and a second memory sector;

[0021] imaging the first memory sector onto a a first cache;

[0022] temporarily storing a part of the first memory sector in the first cache;

[0023] imaging the second memory sector onto a second cache;

[0024] temporarily storing the second memory sector in the second cache,

[0025] wherein the second cache has the same storage capacity as the second memory sector and

[0026] wherein no displacement cycles take place in the second cache;

[0027] selecting a program code segment stored in the second memory sector.

[0028] The process in accordance with this invention images the first memory sector onto the first cache. Since the first memory sector is designed to be larger than the first cache, only part of the first memory sector is saved in temporary storage in the first cache, and displacement cycles do take place. Thus, the data from the first memory sector are stored in the first cache, an example thereof being a program code. The interrupt vectors and the interrupt handlers, as well as specifically selected and predetermined routines, for example, are stored in the second memory sector, which is saved into temporary memory by a second cache. This process makes fast access to specific routines and values possible. The second memory sector, for example, is designed to be as large as the second cache, so that no displacement cycles take place therein.

[0029] A second process step calls for the program code segment to be a subroutine.

[0030] Furthermore, the second memory sector is to be a RAM, a ROM, an EPROM or an EEPROM.

[0031] Another process step calls for storing an interrupt vector in the second cache.

[0032] Furthermore, an interrupt handler is to be stored in the second cache.

[0033] Another advantageous procedural step calls for no displacement cycles to occur in the second cache. This process ensures that the interrupt vectors and/or interrupt handlers are kept available for the processor without time delay in the second cache.

[0034] Other advantageous embodiments of the invention are described in the various sub-claims.

[0035] Below, the invention will be explained in greater detail by means of a sample embodiment and a figure.

[0036] The figure represents a data processing device 1. The data processing device I comprises a processor 2 and a memory 3. Memory 3 is divided into a first memory sector 4 and a second memory sector 6. In this sample embodiment, the first memory sector 4, which constitutes the main memory, is significantly larger than the second memory sector 6. In this instance, the second memory sector 6 is a ROM memory which keeps available operating data which, for example, are needed for a cold start or a reset. The first memory sector 4, for example, is a RAM memory which is used during operation of the data processing device 1 to store program segments and data. In this sample embodiment, the first memory segment 4 is temporarily stored in a first cache 5. The second memory sector 6 is temporarily stored in a second cache 7. In the second memory sector 6, for example, interrupt vectors 8 and interrupt handlers 9 are stored. The second cache 7 thus has the advantage of being transparent to the software running on data processing device 1 and hence requires no special programming on the part of the software developers. A cache therein is a small fast memory which saves data from the comparatively large and slow main memory in temporary storage. The fact that a separate second cache 7 is used for the interrupt vectors 8 guarantees that the interrupt vectors 8 will not be displaced by other data in the second cache 7. No displacement cycles take place, as the second cache 7 has the same storage capacity as the second memory sector 6. By contrast, displacement cycles do take place in the first cache 5 which keep copying the currently needed data from the first memory sector 4 into the first cache 5, displacing data which are no longer needed at the moment. Avoidance of displacement cycles in the second cache 7 significantly speeds up the processing time of the data processing device 1 for the stored data and routines. Examples of already realized magnitudes in the second cache 7 are 256 bytes and 1024 bytes.

[0037] A process for operating the data processing device 1 illustrated in the figure provides that predetermined and selected sub-programs, interrupt vectors 8 and interrupt handlers 9 are stored in the second memory sector 6, which is designed to be a ROM memory. During a cold start or a reset of data processing device 1, the interrupt vectors and interrupt handlers stored in the second memory sector 6 are thus available. During operation, the first memory sector 4 is saved in temporary storage by the first cache 5, and the second memory sector 6 is saved in temporary storage by the second cache 7. Whenever the processor 2 accesses the main memory, the first cache 5 or the second cache 7 are first searched for availability of the data. If so, a cache hit, so called, is achieved; if not, a cache miss occurs. A cache miss results in additional actions executed in data processing device 1, such that the data are read from main memory and sent to processor 2. This, however, requires a significantly longer period of time than a cache hit. Key to Numbers on Figure 1 Data processing device 2 Processor 3 Memory 4 first memory sector 5 first cache 6 second memory sector 7 second cache 8 interrupt vectors 9 interrupt handlers 

1. Data processing device (1) with: a processor (2); a memory (3) connected to the processor (2) and having a first memory sector (4) and a second memory sector (6); a first cache (5) which images the first memory sector (4) and stores a portion of the first memory sector (4) in temporary memory, a second cache (7) which images the second memory sector (6) and stores it in temporary memory, wherein the second cache (7) has the same storage capacity as the second memory sector (6) and wherein the second memory sector (6) is a RAM, a ROM, an EPROM or an EEPROM.
 2. Data processing device in accordance with claim 1, characterized by the fact that an interrupt vector is stored in the second cache (7).
 3. Data processing device in accordance with one of claim 1 or claim 2, characterized by the fact that an interrupt handler is stored in the second cache (7).
 4. Data processing device in accordance with one of claims 1 to 3, characterized by the fact that the storage capacity of the first cache (5) is smaller than the storage capacity of the first memory sector (4).
 5. Data processing device in accordance with one of claims 1 to 3, characterized by the fact that the processor (2) is a processor from ARM corporation.
 6. Process for operation of a data processing device with the steps: Provision of a data processing device (1) which comprises a processor (2) and a memory (3), wherein the memory (3) has a first memory sector (4) and a second memory sector (6); imaging of the first memory sector (4) on a first cache (5); temporary storage of a portion of the first memory sector (4) in the first cache (5); imaging of the second memory sector (6) on a second cache (7), temporary storage of the second memory sector (6) in the second cache (7), wherein the second cache (7) has the same storage capacity as the second memory sector (6) and wherein no displacement cycles take place in the second cache (7); selecting a program code segment for storage in the second memory sector.
 7. Process in accordance with claim 6, characterized by the fact that the program code segment is a sub-routine.
 8. Process in accordance with one of claims 6 or 7, characterized by the fact that the second memory sector (6) is a RAM, a ROM, an EPROM or an EEPROM.
 9. Process in accordance with one of claims 6 to 8, characterized by the fact that an interrupt vector is stored in the second cache (7).
 10. Process in accordance with one of claims 6 to 9, characterized by the fact that an interrupt handler is stored in the second cache (7). 